import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { createHtmlPlugin } from "vite-plugin-html";
import version from "./public/version.json";

const lastestVersion = version[version.length - 1].version;

// https://vite.dev/config/
export default defineConfig(() => {
  return {
    base: "./",
    plugins: [
      react(),
      createHtmlPlugin({
        inject: {
          data: {
            version: lastestVersion,
          },
        },
      }),
    ],
  };
});
